package com.example.bbs.agent.proxy;

/**
 * 代理类
 * author: VC
 * create: 2021/7/16 9:19
 * version: 1.0.0
 */
public class StudentProxy implements Pay {
    private Student stu;

    public StudentProxy(Student stu) {
        this.stu = stu;
    }

    @Override
    public int payMoney() {
        System.out.println("今天学生表现良好,打骨折");
        int money = stu.payMoney();
        if(money < 0){
            System.out.println("交假币,打骨折");
        }
        return 0;
    }
}
